<template>
  <CollapseContainer v-bind="$attrs" title="项目负责人">
    <div class="scroll-wrap">
      <ScrollContainer ref="scrollRef">
        <ul>
          <template v-for="(item, index) in ChargeItems" :key="index">
            <li class="charge-item">
              <span class="title">{{ item.title }}</span>
              <span class="value">{{ item.value }}</span>
            </li>
          </template>
        </ul>
      </ScrollContainer>
    </div>
  </CollapseContainer>
</template>

<script lang="ts" setup>
  import { CollapseContainer } from '/@/components/Container/index';
  import { ScrollContainer } from '/@/components/Container/index';
  import { ChargeItems } from './data';
</script>

<style lang="less" scoped>
  .scroll-wrap {
    width: 100%;
    height: 210px;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
    overflow: auto;
  }

  .charge-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    margin-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
  }

  .charge-item:hover {
    background-color: #f9f9f9;
  }

  .title {
    font-weight: bold;
    color: #007bff;
  }

  .value {
    color: #2f7deb;
    background-color: #eaf2fd;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 400;
    padding: 5px 10px;
    margin-right: 5px;
    display: inline-block;
    text-align: center;
  }
</style>
